const Mock = require('mockjs')
const data = Mock.mock({
  'list|100': [
    {
      id: '@id',
      'type|+1': [
        'CN',
        'US'
      ],
      name: '@cname',
      content: '@cparagraph(1)',
      time: '@datetime',
      'describe|1-99.2': 1
    }
  ]
})

module.exports = [
  {
    url: '/logs/list',
    type: 'get',
    response: config => {
      const { page, size } = config.query
      const list = data.list.slice((page - 1) * size, page * size)
      return {
        code: 200,
        list,
        total: 100
      }
    }
  }
]
